<?php
    require_once(APPPATH . '/controllers/test/Toast.php');

    class attributes_tests extends Toast
    {
        var $ins_id;
        var $attributes_data;
        var $default_attributes = FALSE;

        function __construct()
        {
            parent::__construct(__FILE__);
            $this->load->model('attributes_model');
            // Load any models, libraries etc. you need here
        }

        /**
        * OPTIONAL; Anything in this function will be run before each test
        * Good for doing cleanup: resetting sessions, renewing objects, etc.
        */
        function _pre() {}

        /**
        * OPTIONAL; Anything in this function will be run after each test
        * I use it for setting $this->message = $this->My_model->getError();
        */
        function _post() {}


        /* TESTS BELOW */

        function test_simple_attribute_creating()
        {

            // SOME DEFAULTS ATTRIBUTES
            $this->attributes_data = array(
                /*GENERAL GROUP*/
                array(
                    'ID' => 1,
                    'value'=>'descriptive data',
                    'name'=>'Name',
                    'required'=>1,
                    'custom'=>0,
                    'groups_ID' => $this->config->item('general_ID')    
                ),
                array(
                    'ID' => 2,
                    'value'=>'descriptive data',
                    'name'=>'Number of stars',
                    'required'=>0,
                    'custom'=>0,
                    'groups_ID' => $this->config->item('general_ID')
                ),
                array(
                    'ID' => 3,
                    'value'=>'descriptive data',
                    'name'=>'Distance from the sea',
                    'required'=>0,
                    'custom'=>0,
                    'groups_ID' => $this->config->item('general_ID')
                ),
                array(
                    'ID' => 4,
                    'value'=>'descriptive data',
                    'name'=>'Distance from the center',
                    'required'=>0,
                    'custom'=>0,
                    'groups_ID' => $this->config->item('general_ID')
                ),
                array(
                    'ID' => 5,
                    'value'=>'descriptive data',
                    'name'=>'Contact phone',
                    'required'=>0,
                    'custom'=>0,
                    'groups_ID' => $this->config->item('general_ID')
                ),
                array(
                    'ID' => 6,
                    'value'=>'descriptive data',
                    'name'=>'Contact fax',
                    'required'=>0,
                    'custom'=>0,
                    'groups_ID' => $this->config->item('general_ID')
                ),
                array(
                    'ID' => 7,
                    'value'=>'descriptive data',
                    'name'=>'Address',
                    'required'=>0,
                    'custom'=>0,
                    'groups_ID' => $this->config->item('general_ID')
                ),
                array(
                    'ID' => 8,
                    'value'=>'descriptive data',
                    'name'=>'Search priority',
                    'required'=>0,
                    'custom'=>0,
                    'groups_ID' => $this->config->item('general_ID')
                ),
                array(
                    'ID' => 9,
                    'value'=>'descriptive data',
                    'name'=>'Infant age',
                    'required'=>0,
                    'custom'=>0,
                    'groups_ID' => $this->config->item('general_ID')
                ),
                array(
                    'ID' => 10,
                    'value'=>'descriptive data',
                    'name'=>'Contact phone reception',
                    'required'=>0,
                    'custom'=>0,
                    'groups_ID' => $this->config->item('general_ID')
                ),
                array(
                    'ID' => 11,
                    'value'=>'descriptive data',
                    'name'=>'Contact email',
                    'required'=>1,
                    'custom'=>0,
                    'groups_ID' => $this->config->item('general_ID')
                ),
                array(
                    'ID' => 12,
                    'value'=>'descriptive data',
                    'name'=>'Web page',
                    'required'=>0,
                    'custom'=>0,
                    'groups_ID' => $this->config->item('general_ID')
                ),
                /*DISTANCE FROM GROUP*/
                array(
                    'ID' => 13,
                    'value'=>'descriptive data',
                    'name'=>'Airport',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('distance_from_ID')
                ),
                array(
                    'ID' => 14,
                    'value'=>'descriptive data',
                    'name'=>'Ambulance',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('distance_from_ID')
                ), 
                array(
                    'ID' => 15,
                    'value'=>'descriptive data',
                    'name'=>'Bank office',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('distance_from_ID')
                ), 
                array(
                    'ID' => 16,
                    'value'=>'descriptive data',
                    'name'=>'Bus station',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('distance_from_ID')
                ), 
                array(
                    'ID' => 17,
                    'value'=>'descriptive data',
                    'name'=>'bus station is',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('distance_from_ID')
                ),
                array(
                    'ID' => 18,
                    'value'=>'descriptive data',
                    'name'=>'Distance from the center',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('distance_from_ID')
                ),
                array(
                    'ID' => 19,
                    'value'=>'descriptive data',
                    'name'=>'Distance from the sea',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('distance_from_ID')
                ), 
                array(
                    'ID' => 20,
                    'value'=>'descriptive data',
                    'name'=>'Exchange offices',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('distance_from_ID')
                ), 
                array(
                    'ID' => 21,
                    'value'=>'descriptive data',
                    'name'=>'Farmacies',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('distance_from_ID')
                ), 
                array(
                    'ID' => 22,
                    'value'=>'descriptive data',
                    'name'=>'Ferry port',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('distance_from_ID')
                ),
                array(
                    'ID' => 23,
                    'value'=>'descriptive data',
                    'name'=>'Gas stations',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('distance_from_ID')
                ),
                array(
                    'ID' => 24,
                    'value'=>'descriptive data',
                    'name'=>'hospital',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('distance_from_ID')
                ), 
                array(
                    'ID' => 25,
                    'value'=>'descriptive data',
                    'name'=>'Main roads',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('distance_from_ID')
                ), 
                array(
                    'ID' => 26,
                    'value'=>'descriptive data',
                    'name'=>'Market-place',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('distance_from_ID')
                ), 
                array(
                    'ID' => 27,
                    'value'=>'descriptive data',
                    'name'=>'Post office',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('distance_from_ID')
                ),
                array(
                    'ID' => 28,
                    'value'=>'descriptive data',
                    'name'=>'Railway station',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('distance_from_ID')
                ),
                array(
                    'ID' => 29,
                    'value'=>'descriptive data',
                    'name'=>'Restaurant',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('distance_from_ID')
                ), 
                array(
                    'ID' => 30,
                    'value'=>'descriptive data',
                    'name'=>'Beach',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('distance_from_ID')
                ), 
                array(
                    'ID' => 31,
                    'value'=>'descriptive data',
                    'name'=>'Shop',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('distance_from_ID')
                ), 
                array(
                    'ID' => 32,
                    'value'=>'descriptive data',
                    'name'=>'Tennis courts',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('distance_from_ID')
                ),
                array(
                    'ID' => 33,
                    'value'=>'descriptive data',
                    'name'=>'Tourist agency',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('distance_from_ID')
                ),
                /*BEAHES GROUPS*/
                array(
                    'ID' => 34,
                    'value'=>'yes/no',
                    'name'=>'Hotel beach',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('beaches_ID')
                ), 
                array(
                    'ID' => 35,
                    'value'=>'yes/no',
                    'name'=>'pebble beach',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('beaches_ID')
                ), 
                array(
                    'ID' => 36,
                    'value'=>'yes/no',
                    'name'=>'rocky beach',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('beaches_ID')
                ), 
                array(
                    'ID' => 37,
                    'value'=>'yes/no',
                    'name'=>'sandy beach',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('beaches_ID')
                ),
                /*OBJECT DESCRIPTION GROUP*/       
                array(
                    'ID' => 38,
                    'value'=>'yes/no',
                    'name'=>'Authentic accommodation',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('description_ID')
                ),
                array(
                    'ID' => 39,
                    'value'=>'yes/no',
                    'name'=>'Barbecue',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('description_ID')
                ),
                array(
                    'ID' => 40,
                    'value'=>'yes/no',
                    'name'=>'Berth',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('description_ID')
                ), 
                array(
                    'ID' => 41,
                    'value'=>'yes/no',
                    'name'=>'Children playground',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('description_ID')
                ), 
                array(
                    'ID' => 42,
                    'value'=>'yes/no',
                    'name'=>'Childrens pool',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('description_ID')
                ), 
                array(
                    'ID' => 43,
                    'value'=>'descriptive data',
                    'name'=>'Floor',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('description_ID')
                ),
                array(
                    'ID' => 44,
                    'value'=>'yes/no',
                    'name'=>'free access for vehicles',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('description_ID')
                ),
                array(
                    'ID' => 45,
                    'value'=>'yes/no',
                    'name'=>'Indoor pool',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('description_ID')
                ), 
                array(
                    'ID' => 46,
                    'value'=>'yes/no',
                    'name'=>'Outdoor pool',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('description_ID')
                ), 
                array(
                    'ID' => 47,
                    'value'=>'yes/no',
                    'name'=>'Owner does not live in object',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('description_ID')
                ), 
                array(
                    'ID' => 48,
                    'value'=>'yes/no',
                    'name'=>'Park',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('description_ID')
                ),
                array(
                    'ID' => 49,
                    'value'=>'yes/no',
                    'name'=>'parking place in yard',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('description_ID')
                ),
                array(
                    'ID' => 50,
                    'value'=>'yes/no',
                    'name'=>'Parking space on public road',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('description_ID')
                ), 
                array(
                    'ID' => 51,
                    'value'=>'yes/no',
                    'name'=>'Sauna',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('description_ID')
                ), 
                array(
                    'ID' => 52,
                    'value'=>'yes/no',
                    'name'=>'Shared garden',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('description_ID')
                ),
                array(
                    'ID' => 53,
                    'value'=>'yes/no',
                    'name'=>'The owner lives in the same building',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('description_ID')
                ),
                array(
                    'ID' => 54,
                    'value'=>'yes/no',
                    'name'=>'Washing machine at landlords against fee',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('description_ID')
                ),
                /*LOCATIONS GROUPS*/
                array(
                    'ID' => 55,
                    'value'=>'descriptive data',
                    'name'=>'X coordinate',
                    'required'=>0,
                    'custom'=>0,
                    'groups_ID' => $this->config->item('location_ID')
                ),
                array(
                    'ID' => 56,
                    'value'=>'descriptive data',
                    'name'=>'Y coordinate',
                    'required'=>0,
                    'custom'=>0,
                    'groups_ID' => $this->config->item('location_ID')
                ),
                /*MEALS GROUP*/
                array(
                    'ID' => 57,
                    'value'=>'yes/no',
                    'name'=>'Buffet breakfast',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('meals_ID')
                ),
                array(
                    'ID' => 58,
                    'value'=>'yes/no',
                    'name'=>'buffet dinner',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('meals_ID')
                ), 
                array(
                    'ID' => 59,
                    'value'=>'yes/no',
                    'name'=>'Buffet dinner (with charge)',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('meals_ID')
                ), 
                array(
                    'ID' => 60,
                    'value'=>'yes/no',
                    'name'=>'buffet lunch',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('meals_ID')
                ), 
                array(
                    'ID' => 61,
                    'value'=>'yes/no',
                    'name'=>'Buffet lunch (with charge)',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('meals_ID')
                ),
                array(
                    'ID' => 62,
                    'value'=>'yes/no',
                    'name'=>'dinner – choice of menus',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('meals_ID')
                ),
                array(
                    'ID' => 63,
                    'value'=>'yes/no',
                    'name'=>'lunch - choice of menus',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('meals_ID')
                ), 
                array(
                    'ID' => 64,
                    'value'=>'yes/no',
                    'name'=>'Lunch packet',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('meals_ID')
                ), 
                array(
                    'ID' => 65,
                    'value'=>'yes/no',
                    'name'=>'Non smoking area in the restaurant',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('meals_ID')
                ), 
                array(
                    'ID' => 66,
                    'value'=>'yes/no',
                    'name'=>'Possibility of lunch packages',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('meals_ID')
                ),
                array(
                    'ID' => 67,
                    'value'=>'yes/no',
                    'name'=>'Vegetarian food',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('meals_ID')
                ),
                /*ADDITIONAL ACTIVITIES NEARBY*/
                array(
                    'ID' => 68,
                    'value'=>'yes/no',
                    'name'=>'Banana skiing',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('additional_activities_nearby_ID')
                ), 
                array(
                    'ID' => 69,
                    'value'=>'yes/no',
                    'name'=>'beach volleyball',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('additional_activities_nearby_ID')
                ), 
                array(
                    'ID' => 70,
                    'value'=>'yes/no',
                    'name'=>'Beachfront restaurant',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('additional_activities_nearby_ID')
                ),
                array(
                    'ID' => 71,
                    'value'=>'yes/no',
                    'name'=>'bowling alley',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('additional_activities_nearby_ID')
                ),
                array(
                    'ID' => 72,
                    'value'=>'yes/no',
                    'name'=>'Cinema',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('additional_activities_nearby_ID')
                ), 
                array(
                    'ID' => 73,
                    'value'=>'yes/no',
                    'name'=>'disco club',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('additional_activities_nearby_ID')
                ), 
                array(
                    'ID' => 74,
                    'value'=>'yes/no',
                    'name'=>'Diving school',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('additional_activities_nearby_ID')
                ), 
                array(
                    'ID' => 75,
                    'value'=>'yes/no',
                    'name'=>'Double canoe',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('additional_activities_nearby_ID')
                ),
                array(
                    'ID' => 76,
                    'value'=>'yes/no',
                    'name'=>'horseback riding',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('additional_activities_nearby_ID')
                ),
                array(
                    'ID' => 77,
                    'value'=>'yes/no',
                    'name'=>'Indoor pool',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('additional_activities_nearby_ID')
                ), 
                array(
                    'ID' => 78,
                    'value'=>'yes/no',
                    'name'=>'music evenings',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('additional_activities_nearby_ID')
                ), 
                array(
                    'ID' => 79,
                    'value'=>'yes/no',
                    'name'=>'Organized excursions',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('additional_activities_nearby_ID')
                ), 
                array(
                    'ID' => 80,
                    'value'=>'yes/no',
                    'name'=>'Outdoor pool',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('additional_activities_nearby_ID')
                ),
                array(
                    'ID' => 81,
                    'value'=>'yes/no',
                    'name'=>'paths for walking and jogging',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('additional_activities_nearby_ID')
                ),
                array(
                    'ID' => 82,
                    'value'=>'yes/no',
                    'name'=>'Rent a kayak boat',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('additional_activities_nearby_ID')
                ), 
                array(
                    'ID' => 83,
                    'value'=>'yes/no',
                    'name'=>'sailing',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('additional_activities_nearby_ID')
                ), 
                array(
                    'ID' => 84,
                    'value'=>'yes/no',
                    'name'=>'SCUBA diving',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('additional_activities_nearby_ID')
                ), 
                array(
                    'ID' => 85,
                    'value'=>'yes/no',
                    'name'=>'Single canoe',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('additional_activities_nearby_ID')
                ),
                array(
                    'ID' => 86,
                    'value'=>'yes/no',
                    'name'=>'Table tennis',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('additional_activities_nearby_ID')
                ),
                array(
                    'ID' => 87,
                    'value'=>'yes/no',
                    'name'=>'Water skiing',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('additional_activities_nearby_ID')
                ),
                /*HOTEL EQUIPMENT AND OFFERING*/
                array(
                    'ID' => 88,
                    'value'=>'yes/no',
                    'name'=>'24 hour room service',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ), 
                array(
                    'ID' => 89,
                    'value'=>'yes/no',
                    'name'=>'bar within hotel',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ), 
                array(
                    'ID' => 90,
                    'value'=>'yes/no',
                    'name'=>'beauty salon',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ),
                array(
                    'ID' => 91,
                    'value'=>'yes/no',
                    'name'=>'Boutique',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ),
                array(
                    'ID' => 92,
                    'value'=>'yes/no',
                    'name'=>'Car rental desk',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ), 
                array(
                    'ID' => 93,
                    'value'=>'yes/no',
                    'name'=>'casino',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ), 
                array(
                    'ID' => 94,
                    'value'=>'yes/no',
                    'name'=>'Children entertaiment',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ), 
                array(
                    'ID' => 95,
                    'value'=>'yes/no',
                    'name'=>'Childrens pool',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ),
                array(
                    'ID' => 96,
                    'value'=>'yes/no',
                    'name'=>'Cocktailbar',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ),
                array(
                    'ID' => 97,
                    'value'=>'yes/no',
                    'name'=>'computer available',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ), 
                array(
                    'ID' => 98,
                    'value'=>'yes/no',
                    'name'=>'Lift',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ), 
                array(
                    'ID' => 99,
                    'value'=>'yes/no',
                    'name'=>'Dry cleaning',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ), 
                array(
                    'ID' => 100,
                    'value'=>'yes/no',
                    'name'=>'Entertaiment for adults',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ),
                array(
                    'ID' => 101,
                    'value'=>'yes/no',
                    'name'=>'Excange office',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ),
                array(
                    'ID' => 102,
                    'value'=>'yes/no',
                    'name'=>'exhibition area',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ), 
                array(
                    'ID' => 103,
                    'value'=>'yes/no',
                    'name'=>'Fax',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ), 
                array(
                    'ID' => 104,
                    'value'=>'yes/no',
                    'name'=>'Garage on request',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ), 
                array(
                    'ID' => 105,
                    'value'=>'yes/no',
                    'name'=>'hotel parking',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ),
                array(
                    'ID' => 106,
                    'value'=>'yes/no',
                    'name'=>'Internet',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ),
                array(
                    'ID' => 107,
                    'value'=>'yes/no',
                    'name'=>'Internet caffe',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ),
                array(
                    'ID' => 108,
                    'value'=>'yes/no',
                    'name'=>'Non-smoking rooms',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ),
                array(
                    'ID' => 109,
                    'value'=>'descriptive data',
                    'name'=>'number of meeting halls',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ),
                array(
                    'ID' => 110,
                    'value'=>'descriptive data',
                    'name'=>'number of small meeting rooms',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ),
                array(
                    'ID' => 111,
                    'value'=>'yes/no',
                    'name'=>'Poolbar',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ),
                array(
                    'ID' => 112,
                    'value'=>'yes/no',
                    'name'=>'Restaurant',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ), 
                array(
                    'ID' => 113,
                    'value'=>'yes/no',
                    'name'=>'Safe at the reception',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ), 
                array(
                    'ID' => 114,
                    'value'=>'yes/no',
                    'name'=>'Salons and terraces for reception and cocktail',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ), 
                array(
                    'ID' => 115,
                    'value'=>'yes/no',
                    'name'=>'Sauna',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ),
                array(
                    'ID' => 116,
                    'value'=>'yes/no',
                    'name'=>'Sport and recreation hall',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ),
                array(
                    'ID' => 117,
                    'value'=>'yes/no',
                    'name'=>'Souvenir shop',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ), 
                array(
                    'ID' => 118,
                    'value'=>'yes/no',
                    'name'=>'Sunchairs and parasols at the beach',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ), 
                array(
                    'ID' => 119,
                    'value'=>'yes/no',
                    'name'=>'Tavern',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ), 
                array(
                    'ID' => 120,
                    'value'=>'yes/no',
                    'name'=>'Terrace for dancing',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ),
                array(
                    'ID' => 121,
                    'value'=>'yes/no',
                    'name'=>'trade center',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ),
                array(
                    'ID' => 122,
                    'value'=>'yes/no',
                    'name'=>'TV hall',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ), 
                array(
                    'ID' => 123,
                    'value'=>'yes/no',
                    'name'=>'Wellness centar',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ), 
                array(
                    'ID' => 124,
                    'value'=>'yes/no',
                    'name'=>'wheelchair access',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ), 
                array(
                    'ID' => 125,
                    'value'=>'yes/no',
                    'name'=>'Wine celler',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('hotel_equipment_and_offerings_ID')
                ),
                /*ALL ACCOMMODATION UNITS ARE EQUIPED WITH GROUP*/
                array(
                    'ID' => 126,
                    'value'=>'yes/no',
                    'name'=>'Air-conditioning (some of the rooms)',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('all_accommodation_units_are_equiped_with_ID')
                ),
                array(
                    'ID' => 127,
                    'value'=>'yes/no',
                    'name'=>'Balcony',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('all_accommodation_units_are_equiped_with_ID')
                ), 
                array(
                    'ID' => 128,
                    'value'=>'yes/no',
                    'name'=>'bathroom/toilet',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('all_accommodation_units_are_equiped_with_ID')
                ), 
                array(
                    'ID' => 129,
                    'value'=>'yes/no',
                    'name'=>'hair drier',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('all_accommodation_units_are_equiped_with_ID')
                ), 
                array(
                    'ID' => 130,
                    'value'=>'yes/no',
                    'name'=>'Heating',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('all_accommodation_units_are_equiped_with_ID')
                ),
                array(
                    'ID' => 131,
                    'value'=>'yes/no',
                    'name'=>'Internet connection',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('all_accommodation_units_are_equiped_with_ID')
                ),
                array(
                    'ID' => 132,
                    'value'=>'yes/no',
                    'name'=>'Jakuzzi',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('all_accommodation_units_are_equiped_with_ID')
                ), 
                array(
                    'ID' => 133,
                    'value'=>'yes/no',
                    'name'=>'Kitchen',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('all_accommodation_units_are_equiped_with_ID')
                ), 
                array(
                    'ID' => 134,
                    'value'=>'yes/no',
                    'name'=>'minibar',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('all_accommodation_units_are_equiped_with_ID')
                ), 
                array(
                    'ID' => 135,
                    'value'=>'yes/no',
                    'name'=>'Room safe',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('all_accommodation_units_are_equiped_with_ID')
                ),
                array(
                    'ID' => 136,
                    'value'=>'yes/no',
                    'name'=>'safe',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('all_accommodation_units_are_equiped_with_ID')
                ),
                array(
                    'ID' => 137,
                    'value'=>'yes/no',
                    'name'=>'Satellite television',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('all_accommodation_units_are_equiped_with_ID')
                ), 
                array(
                    'ID' => 138,
                    'value'=>'yes/no',
                    'name'=>'Sitting area',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('all_accommodation_units_are_equiped_with_ID')
                ), 
                array(
                    'ID' => 139,
                    'value'=>'yes/no',
                    'name'=>'Telephone',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('all_accommodation_units_are_equiped_with_ID')
                ), 
                array(
                    'ID' => 140,
                    'value'=>'yes/no',
                    'name'=>'Terrace',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('all_accommodation_units_are_equiped_with_ID')
                ),
                array(
                    'ID' => 141,
                    'value'=>'yes/no',
                    'name'=>'TV',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('all_accommodation_units_are_equiped_with_ID')
                ),
                array(
                    'ID' => 142,
                    'value'=>'yes/no',
                    'name'=>'Wireless communication',
                    'required'=>0,
                    'custom'=>1,
                    'groups_ID' => $this->config->item('all_accommodation_units_are_equiped_with_ID')
                )
            )
            ;
            $this->firephp->log($this->attributes_data);

            if($this->default_attributes)
                foreach ($this->attributes_data as $row):
                    $inser_id = $this->attributes_model->insert($row);
                    $this->firephp->log($inser_id);
                    $this->_assert_true($inser_id); // true*/
                    endforeach;

            $this->_assert_true($this->default_attributes);

        }

        function test_default_attributes_exists()
        {
            // Check if method exists
            $exists = (int)method_exists($this->attributes_model, 'view_all_attributes');
            $this->_assert_true($exists);

            //check view_all groups -> 0 default, 1 custom
            $all_attributes = $this->attributes_model->view_all_attributes(0);
            //$this->firephp->log($all_groups);

            $this->_assert_not_empty($all_attributes); // true*/

            $default_group_count = count($this->attributes_data);

            for($i=0;$i<$default_group_count;$i++){
                //$this->firephp->log($this->groups_data[$i]['name']);
                //$this->firephp->log($all_groups[$i]['name']);
                //$this->_assert_equals($this->attributes_data[$i]['name'],$all_attributes[$i]['name']);
            }

            // description to the unit test results page:
            $this->message = '$all_groups ==  $this->groups_data';
        }

        function test_add_attribute()
        {
            // Check if method exists
            $exists = (int)method_exists($this->attributes_model, 'insert');
            $this->_assert_true($exists);

            // check insert group
            $data = array(
                'value'=>'descriptive data',
                'name'=>'test',
                'required'=>0,
                'custom'=>0,
                'groups_ID' => $this->config->item('general_ID')
            );
            $this->ins_id = $this->attributes_model->insert($data);
            //$this->firephp->log($this->ins_id);
            $this->_assert_true($this->ins_id); // true*/

        }

        function test_delete_attribute()
        {
            // Check if method exists
            $exists = (int)method_exists($this->attributes_model, 'delete_attribute');
            $this->_assert_true($exists);

            //check delete group
            $delete_res = $this->attributes_model->delete_attribute($this->ins_id);
            //$this->firephp->log($delete_res);
            $this->_assert_true($delete_res);
        }

    }

    // End of file example_test.php */
    // Location: ./system/application/controllers/test/example_test.php */